<?php
/**
 * Created by IntelliJ IDEA.
 * User: cong.ding
 * Date: 2017/10/09
 * Time: 17:10
 */

//function add_goods_type()
//{
    $mysqli =get_mysql_connect();

    $name = $_POST['type_name'];

    if(empty($name)){
      return false;
    }

    $sql = "insert into type_name (type_name) VALUES ('" . $name . "')";
    if (mysqli_query($mysqli, $sql)) {
      return true;
    } else {
      return false;
    }
//}
